package com.sdy.kzyy.pc.task;

import com.sdy.kzyy.biz.service.StoreInventoryService;
import com.sdy.mvc.annotation.TaskSync;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 每天0点修改补货
 *
 * @author cgj
 */
@Slf4j
@Component
public class ReplenishNextDayTask {
    @Autowired
    private StoreInventoryService storeInventoryService;

    @Scheduled(cron = "0 01 0 * * ? ")
    // @Scheduled(cron = "0/30 * * * * ? ")
    @TaskSync
    public void replenishNextDayTask() {
        storeInventoryService.updateAllCount();
    }
}


